cmake_minimum_required(VERSION 3.17)
project(net-hole)

set(CMAKE_CXX_STANDARD 11)

option(SERVER "generate server" ON)
option(CLIENT "generate client" ON)

include_directories(include)

if (SERVER)
    add_executable(nhserver src/server.cpp
            src/MySocket.cpp
            src/NhSocket.cpp)

    target_link_libraries(nhserver PRIVATE pthread)
endif (SERVER)

if (CLIENT)
    add_executable(nhclient src/client.cpp
            src/MySocket.cpp
            src/NhSocket.cpp)

    target_link_libraries(nhclient PRIVATE pthread)
endif (CLIENT)

